package com.un.ebs.product.domain;

import com.un.ebs.product.enums.ProductBomTypeEnum;
import com.un.ebs.product.enums.SkuItemDeliverTypeEnum;
import java.util.Date;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (ProductSkuItem)表实体类
 *
 * @author liubo
 * @since 2020-10-22 10:57:32
 */
@Data
@Component
@TableName("tb_product_sku_item")
@SuppressWarnings("serial")
public class ProductSkuItem extends Model<ProductSkuItem> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "sku_id", length = 40, precision = 0)
    private String skuId;

    @DbField(name = "include_sku_id", length = 40, precision = 0)
    private String includeSkuId;

    @DbField(name = "qty", length = 18, precision = 4)
    private Double qty;

    @TableLogic
    @DbField(name = "is_delete", length = -1, precision = 0)
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_time", length = -1, precision = 0)
    private Date lastModifiedTime;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_at", length = 40, precision = 0)
    private String lastModifiedAt;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @DbField(name = "parent_id", length = 40, precision = 0)
    private String parentId;

    @DbField(name = "sort", length = -1, precision = 0)
    private Integer sort;

    @DbField(name = "is_allow_lack_start", length = -1, precision = 0)
    private Boolean isAllowLackStart;

    @DbField(name = "deliver_type", length = -1, precision = 0)
    private SkuItemDeliverTypeEnum deliverType;

    @DbField(name = "bom_type", length = -1, precision = 0)
    private ProductBomTypeEnum bomType;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}